package com.beamfield.dao.portal;

import com.beamfield.model.News;
import com.beamfield.modelVo.NewsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface NewsMapper {
    int deleteByPrimaryKey(Long news_id);

    int insert(News record);

    int insertSelective(News record);

    News selectByPrimaryKey(Long news_id);

    int updateByPrimaryKeySelective(News record);

    int updateByPrimaryKeyWithBLOBs(News record);

    int updateByPrimaryKey(News record);

    List<NewsVo> selectByBeamId(@Param("offset") String offset, @Param("limit") String limit, @Param("beamId") Long beamId, @Param("newsId") String newsId, @Param("title") String title, @Param("newsSectionId") String newsSectionId);

    long countByBeamId(@Param("beamId") Long beamId, @Param("newsId") String newsId, @Param("title") String title,@Param("newsSectionId") String newsSectionId);

    List<News> selectByNewsSectionId(@Param("newsSectionId") Long news_section_id, @Param("beamId") Long beamId, @Param("offset") String offset, @Param("limit")String limit);
}